/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author LUIS
 */
//import javax.xml.bind.annotation.XmlAccessType;
//import javax.xml.bind.annotation.XmlAccessorType;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
//import javax.xml.bind.annotation.XmlSeeAlso;
//import javax.xml.bind.annotation.XmlType;

@XmlRootElement(name="cell")
public class Cell implements Serializable{
	
	private int x;
	private int y;
	private int passable=1;
	private int type=0;
	private Object o=null;
	public Cell(){}
	
	public Cell(int a, int b){
		x=a;y=b;
	}
	
	@XmlAttribute
	public int getX() {
		return x;
	}
	
	public void setX(int x) {
		this.x = x;
	}
	
	@XmlAttribute
	public int getY() {
		return y;
	}
	
	public void setY(int y) {
		this.y = y;
	}
	
	@XmlElement
	public int getPassable() {
		return passable;
	}
	
	public void setPassable(int passable) {
		this.passable = passable;
	}
	
	@XmlElement
	public int getType() {
		return type;
	}
	
	public void setType(int type) {
		this.type = type;
	}
	
	@XmlElement(name="object")
	public Object getObject() {
		return o;
	}
	
	public void setObject(Object o) {
		this.o = o;
	}
	
	public boolean isTransitable() {
		if (this.passable >0) return true;
		else return false;
	}
	
}
